package com.lj.base.key.equals;

import com.BeanUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangsp1 on 16/3/29.
 */
public class HashMapKeyUnChangeMain {
    public static void main(String args[]) throws Exception{
        Map mp = new HashMap();
        HashKeyUnchange k1 = new HashKeyUnchange();
        HashKeyUnchange k2 = new HashKeyUnchange();
        HashKeyUnchange k3 = new HashKeyUnchange();
        HashKeyUnchange k4 = new HashKeyUnchange();
        mp.put(k1,k1);
        mp.put(k2,k2);
        mp.put(k3,k3);
        mp.put(k4,k4);

        Object[] table = (Object[]) BeanUtil.getFieldValue(mp,"table");
        int cnt = table.length;
        System.out.println("map实际数据量：" + mp.size());

    }
}
